<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
	</head>
	<body>
		<script type="text/javascript">
			let x = 5;
			function fn(x) {
			    return function(y) {
			        console.log(y + (++x));
			    }
			}
			let f = fn(6);
			f(7);
			console.log(x);
			// fn作用域里
			// x = 6
			// function(y) {
			//     console.log(y + (++x));
			// }
			// y = 7
			// 7 + (++x) == 14
			// x ==> 5
			
			
			
		</script>
	</body>
</html>
